From e675405f3a70c6497596b4060ee2805e787a4b90 Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Wed, 24 Aug 2011 09:33:10 +0100 Subject: [PATCH] x86: don't limit dom0's maximum reservation by the available memory Set dom0's initial maximum reservation using the max value supplied in the dom0_mem command line option without limiting it by the available memory. This allows dom0 to make use of any hotplugged memory without having to also adjust the maximum reservation. Signed-off-by: David Vrabel Acked-by: Jan Beulich --- xen/arch/x86/domain_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c index f818f0b876..a2cebb7c21 100644 --- a/xen/arch/x86/domain_build.c +++ b/xen/arch/x86/domain_build.c @@ -254,7 +254,7 @@ static unsigned long __init compute_dom0_nr_pages( } #endif - d->max_pages = min(max_pages, avail); + d->max_pages = min_t(unsigned long, max_pages, UINT_MAX); return nr_pages; } -- 2.30.2